//
//  IvanNavigationBar.m
//  YuchBox
//
//  Created by Ivan on 11-10-28.
//  Copyright 2011年 __MyCompanyName__. All rights reserved.
//

#import "IvanNavigationBar.h"

@implementation IvanNavigationBar

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
    }
    return self;
}

- (void)callbackSetBarItems:(NSObject <IvanNavgationBarDelegate> *)delegate
{
    // clear first
    [delegate setBarItems];
}

- (void)drawRect:(CGRect)rect
{
    UIImage *image = [UIImage imageNamed:@"emailNavbarBackgroud.png"];
    [image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
}
@end

//
// class IvanNavgationBarController
//
@implementation IvanNavgationBarController
@synthesize ivanNavigationBar = _ivanNavigationBar;

- (id)init
{
    self = [super init];
    
    if (self) {
        IvanNavigationBar *ivanNavigationBar = [[IvanNavigationBar alloc] initWithFrame:CGRectMake(0, 20, 320, 45)];
        [self setIvanNavigationBar:ivanNavigationBar];
        [ivanNavigationBar release];
    }
    return self;
}

- (void)dealloc
{
    [_ivanNavigationBar release];
    [super dealloc];
}

@end
